package com.heiliushu.baseWeb.web.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.heiliushu.baseWeb.domain.entity.Role;
import com.heiliushu.baseWeb.domain.mapper.RoleMapper;
import com.heiliushu.baseWeb.service.system.RoleService;

/**
 * Created by yudm on 2016-11-02.
 */
@Controller
public class HomeController {

	@Autowired
	private RoleService roleService;
	
    @RequestMapping(value = "/",method = RequestMethod.GET)
    public String index(ModelMap modelMap){
        return "index";
    }
    @RequestMapping(value = "/home",method = RequestMethod.GET)
    public String home(ModelMap modelMap){
    	Integer id = 1;
    	Role role =  roleService.selectById(id);
    	System.out.println(role.getRoleName());
        return "home";
    }
}
